package com.myzj.sportplay.controller;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;


/**
 * 测试接口类
 */

@SpringBootTest
@RunWith(SpringRunner.class)
public class MailDemoApplicationTests {

    @Autowired
    SendMail sendMail;


    /**
     * 普通邮件发送
     */
    @Test
    public void sendSimpleMail() {
        sendMail.sendMsg("3022186194@qq.com","注册成功","恭喜注册成功");
    }

    @Test
    public void sendSimpleMail2() {
        String activeCode = "6cc5cbd52c214c50a0b3d76f3b3cc7aa";
        // 准备激活链接
        String textHtml = "activation-account.html";
        String activationUrl ="http://localhost:9000/activeUser?activeCode="+activeCode;
        sendMail.sendMsg("3022186194@qq.com","注册账号激活",textHtml,activationUrl);
    }
}
